package buffered;

import java.io.*;

public class BufferedStream1 {
    public static void main(String[] args) throws IOException {
        BufferedReader br=new BufferedReader(new FileReader("G:\\Javatest2\\buffered\\c.txt"));
        BufferedWriter bw=new BufferedWriter(new FileWriter("G:\\Javatest2\\buffered\\d.txt"));
        String line;
        while((line= br.readLine())!=null){
            bw.write(line);
//            增加换行符，跨平台
            bw.newLine();
        }
        br.close();
        bw.close();

//        final var string = br.readLine();
//        System.out.println(string);
//        final var string2= br.readLine();
//        System.out.println(string2);
//        String string3=br.readLine();
//        System.out.println(string3);


    }
}
